$(document).ready(function(){
	login();
});

function login(){
	$("#login").click(function(){
		$.post(
				"127.0.0.1:8080/datacompute/login",
				{
					"user.name":$("#username").val(),
					"user.password":$("#password").val()
				},
				function(data,status){
					if(data.code==0)
						window.location.href="index.html";
					else
						alert(data.message);
			});
	});
}
